<section class="content height-100p">

    <div class="container-fluid">

        <div class="row height-100p">
            <div class="col-lg-12">
                <div class="view-header">
                    <div class="header-icon">
                        <i class="pe page-header-icon pe-7s-albums"></i>
                    </div>

                    <div class="header-title">
                        <div class="pull-right">
                            <p ng-show="syncedBlock == 1">索引已满。 我们可以显示所有属性</p>
                            <p ng-show="syncedBlock == -1">索引尚未就绪</p>
                            <p ng-show="syncedBlock > 1">合约，自块后添加 <b class="c-white">#{{syncedBlockString}}</b>, 将正确显示</p>
                            <p>存储用于索引 <b class="c-white">{{indexSizeString}}</b> | Solc 版本 <b class="c-white">{{solcVersionString}}</b></p>
                        </div>

                        <h3 class="m-b-xs">合约</h3>
                        <small>
                            查看合同的存储区域
                        </small>
                    </div>
                    <hr>
                </div>
            </div>
        </div>
    </div>


    <div class="row height-100p">

        <div class="col-lg-12" ng-cloak>

            <div class="panel panel-filled">
                <div class="row">
                    <div class="col-lg-6">

                        <div class="panel-heading flex flex-justify-between">
                            <a href="#" ng-click="onBackToList()" class="btn btn-w-md btn-default">返回目录</a>
                            <!--<span class="m-l-sm"/>-->
                        </div>

                        <div class="panel-heading">
                            <h4>添加联系人以查看其存储空间</h4>
                            <p ng-hide="isLoadingComplete" class="text-warning">
                                * 同步尚未完成。 合同块可能尚不存在。
                            </p>
                        </div>

                        <div class="panel-body" id="newcontract-scroll-container">
                            <form name="newContractForm" novalidate class="bs-example">
                                <div class="form-group" show-errors>
                                    <label>Address</label>
                                    <input class="form-control" ng-model="newContract.address"
                                           ethaddress
                                           name="address" required="true" type="text">

                                    <div ng-show="newContractForm.$submitted || newContractForm.address.$touched">
                                        <div class="text-danger" ng-show="newContractForm.address.$error.required">地址是必需的</div>
                                        <div class="text-danger" ng-show="newContractForm.address.$error.ethaddress">地址格式无效</div>
                                        <div class="text-danger" ng-show="newContractForm.address.$error.ethaddresschecksum">校验和地址格式无效</div>
                                    </div>
                                </div>

                                <div class="form-group" show-errors>

                                    <div class="form-group">
                                        <label>Solidity 代码</label>

                                        <textarea name="sourceCode"
                                                  class="form-control" rows="3"
                                                  ng-model="newContract.sourceCode"
                                                  placeholder=""
                                                  autocomplete="off">
                                        </textarea>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label>Solidity 文件</label>

                                    <input id="fileInput" type="file" name="contracts" multiple="true"
                                           style="visibility: hidden; height: 1px" />
                                    <a href="#"
                                       ng-click="onAddFile()"
                                       class="btn btn-w-md btn-default">附加文件</a>

                                    <div ng-repeat="file in files" class="m-t-sm">
                                        {{file.name}}
                                        <a href="#" ng-click="onRemoveFile(file)">remove</a>
                                    </div>

                                </div>

                                <div ng-hide="submitErrorMessage == ''" class="text-danger">
                                    {{submitErrorMessage}}
                                </div>

                            </form>

                            <div class="form-group flex flex-justify-center m-t-md">
                                <a href="#"
                                   ng-click="onFinalAddFiles()"
                                   class="btn btn-w-md btn-primary">上传 !!!</a>
                            </div>

                        </div>


                    </div>
                </div>

            </div>


        </div>
    </div>


    </div>
</section>